﻿using CardPlay.Model.CardModel;
using CardPlay.Model.GameModel;
using CardPlay.Model.GameModel.Actions;

namespace CardPlay.DemoPack.Games.CanfieldVariants
{
    [Game("BF2E385A-766B-4DAE-823E-2137A47151C4", LevelOfDifficulty.Medium, LevelOfSkill.MostlyChance, DurationOfPlay.LessThan5Minutes, Family = FamilyName)]
    public class Acme : Canfield
    {
        public Acme()
        {
            MaximumDeals = 2;
            CardsPerDeal = 1;
        }

        protected override void PrepareDealScript(DealScript script)
        {
            script.DealAcesTo(NamesOfFoundations);
            script.Deal("12 down,1 up").To(Reserve);
            script.DealCardToEach(NamesOfTableaus);
            script.DealRemainingFaceDownTo(Stock);
        }

        protected override bool AllowedToPickupAtTableau(RemovePileAction action)
        {
            return action.IsActingOnFaceUpTopCard();
        }
    }
}